import java.util.Scanner;

public class text7 {
    public static int Max(int a,int b){
        return a>b?a:b;
    }

    public static double Max(double x,double y,double z){
        return (x>y?x:y)>z?(x>y?x:y):z;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a= sc.nextInt();
        int b= sc.nextInt();
        int max=Max(a,b);
        System.out.println(max);
        Double d= sc.nextDouble();
        Double e= sc.nextDouble();
        Double f= sc.nextDouble();
        double max2=Max(d,e,f);
        System.out.println(max2);
        sc.close();
    }
}

